package dao

import (
	"openeuler.org/PilotGo/PilotGo-plugin-automation/internal/global"
	"openeuler.org/PilotGo/PilotGo-plugin-automation/internal/module/resources/model"
)

func GetResourceHosts() (interface{}, error) {
	var hosts []model.Host
	if err := global.App.MySQL.Model(&model.Host{}).Find(&hosts).Error; err != nil {
		return nil, err
	}
	return hosts, nil
}
